﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace _08.组合模式
{
    class Program
    {
        static void Main(string[] args)
        {
            ProductCreatedEventHandler handler1 = new ProductCreatedEventHandler();
            ProductCreatedEventHandler handler2 = new ProductCreatedEventHandler();

            EventHandlerComposite composite=new EventHandlerComposite();
            composite.Add(handler1);
            composite.Add(handler2);

            composite.Handle();

            Console.WriteLine("OK");
            Console.ReadKey();
        }
    }
}
